from flask_wtf import FlaskForm
from wtforms import TextAreaField,StringField,SubmitField
from wtforms.validators import DataRequired,Length
from wtforms.validators import ValidationError

class PostForm(FlaskForm):
    title = StringField('标题',validators=[DataRequired(),Length(6,30,message="题目长度不符合要求6-30位")])
    content = TextAreaField("内容",render_kw={'placeholder':'这一刻你的想法...'},validators=[DataRequired(),Length(3,140,message="3-140个字")])
    submit = SubmitField("发表")
